#include "process.h"
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>

#define SIZE 1024.0

void Text()
{
    double TotalSize = SIZE;
    double DownSpeed = (double)(rand()%10 + 1);
    double tmpDownSpeed = 0.0;
    while(DownSpeed <= TotalSize)
    {
        /* 下载程序*/
        tmpDownSpeed = (double)(rand()%10 + 1);
        Downprocess(TotalSize, DownSpeed, tmpDownSpeed);
        DownSpeed += tmpDownSpeed;
        usleep(50000);
    }
    printf("\nDownLoad Complete!\n");
}

int main()
{
    srand(time(NULL));
    Text();
    return 0;
}
